﻿<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    
        <h1>
            Lookup Cuts by Title</h1>
        <br />
    
        Cut Title
        <asp:TextBox ID="AlbumTitle" runat="server"></asp:TextBox>
        &nbsp;<asp:LinkButton ID="LookupCuts" runat="server">Lookup Cuts</asp:LinkButton>
        <br />
        <asp:GridView ID="CutsGridView" runat="server" AutoGenerateColumns="False" 
            DataSourceID="CutsByTitleDataSource">
            <Columns>
                <asp:BoundField DataField="AlbumId" HeaderText="AlbumId" 
                    SortExpression="AlbumId" />
                <asp:BoundField DataField="CutNumber" HeaderText="CutNumber" 
                    SortExpression="CutNumber" />
                <asp:BoundField DataField="Title" HeaderText="Title" SortExpression="Title" />
                <asp:BoundField DataField="LengthInSeconds" HeaderText="LengthInSeconds" 
                    SortExpression="LengthInSeconds" />
            </Columns>
        </asp:GridView>
    
        <asp:ObjectDataSource ID="CutsByTitleDataSource" runat="server" 
            OldValuesParameterFormatString="original_{0}" SelectMethod="LookupCuts" 
            TypeName="MusicLine.MusicLineController">
            <SelectParameters>
                <asp:ControlParameter ControlID="AlbumTitle" Name="Title" PropertyName="Text" 
                    Type="String" />
            </SelectParameters>
        </asp:ObjectDataSource>
    
        <h1>
            Lookup Cuts by Artist</h1>
        <p>
            Artist Name
            <asp:TextBox ID="ArtistName" runat="server" Height="22px"></asp:TextBox>
&nbsp;<asp:LinkButton ID="LookupByArtist" runat="server">Lookup Cuts</asp:LinkButton>
            <br />
            <asp:GridView ID="CutsByArtistGridView" runat="server" 
                AutoGenerateColumns="False" DataSourceID="CutsByArtistDataSource">
                <Columns>
                    <asp:BoundField DataField="CutNumber" HeaderText="CutNumber" 
                        SortExpression="CutNumber" />
                    <asp:BoundField DataField="Title" HeaderText="Title" SortExpression="Title" />
                    <asp:BoundField DataField="LengthInSeconds" HeaderText="LengthInSeconds" 
                        SortExpression="LengthInSeconds" />
                </Columns>
            </asp:GridView>
            <asp:ObjectDataSource ID="CutsByArtistDataSource" runat="server" 
                OldValuesParameterFormatString="original_{0}" SelectMethod="LookupCutsByArtist" 
                TypeName="MusicLine.MusicLineController">
                <SelectParameters>
                    <asp:ControlParameter ControlID="ArtistName" Name="ArtistName" 
                        PropertyName="Text" Type="String" />
                </SelectParameters>
            </asp:ObjectDataSource>
            </p>
    
    </div>
    </form>
</body>
</html>
